//part1:C06:ex6.47.cpp
#include <iostream>
#include <vector>
using namespace std;

void print1(vector<int> vec, unsigned index)
{
    unsigned sz = vec.size(); 
    #ifndef NDEBUG
    cout << "vector size is : " << sz << endl;
    #endif

    if (!vec.empty() && index < sz){
        cout << vec[index] << endl;
        print1(vec, index + 1);
    }
}

int main(void)
{
    vector<int> vec = {1, 3, 5, 7, 9, 11, 13, 15};
    print1(vec, 0);

    return 0;
}
